\(\int \frac {1+2 x^2}{1-5 x^2+4 x^4} \, dx\) [52]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 22, antiderivative size = 39 \[ \int \frac {1+2 x^2}{1-5 x^2+4 x^4} \, dx=-\frac {1}{2} \log (1-2 x)+\frac {1}{2} \log (1-x)-\frac {1}{2} \log (1+x)+\frac {1}{2} \log (1+2 x) \]

[Out]

-1/2*ln(1-2*x)+1/2*ln(1-x)-1/2*ln(1+x)+1/2*ln(1+2*x)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {1175, 630, 31} \[ \int \frac {1+2 x^2}{1-5 x^2+4 x^4} \, dx=-\frac {1}{2} \log (1-2 x)+\frac {1}{2} \log (1-x)-\frac {1}{2} \log (x+1)+\frac {1}{2} \log (2 x+1) \]

[In]

Int[(1 + 2*x^2)/(1 - 5*x^2 + 4*x^4),x]

[Out]

-1/2*Log[1 - 2*x] + Log[1 - x]/2 - Log[1 + x]/2 + Log[1 + 2*x]/2

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 630

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[c/q, Int[1/Simp
[b/2 - q/2 + c*x, x], x], x] - Dist[c/q, Int[1/Simp[b/2 + q/2 + c*x, x], x], x]] /; FreeQ[{a, b, c}, x] && NeQ
[b^2 - 4*a*c, 0] && PosQ[b^2 - 4*a*c] && PerfectSquareQ[b^2 - 4*a*c]

Rule 1175

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[2*(d/e) - b/c, 2]},
Dist[e/(2*c), Int[1/Simp[d/e + q*x + x^2, x], x], x] + Dist[e/(2*c), Int[1/Simp[d/e - q*x + x^2, x], x], x]] /
; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 - a*e^2, 0] && (GtQ[2*(d/e) - b/c, 0] || ( !Lt
Q[2*(d/e) - b/c, 0] && EqQ[d - e*Rt[a/c, 2], 0]))

Rubi steps \begin{align*} \text {integral}& = \frac {1}{4} \int \frac {1}{\frac {1}{2}-\frac {3 x}{2}+x^2} \, dx+\frac {1}{4} \int \frac {1}{\frac {1}{2}+\frac {3 x}{2}+x^2} \, dx \\ & = \frac {1}{2} \int \frac {1}{-1+x} \, dx-\frac {1}{2} \int \frac {1}{-\frac {1}{2}+x} \, dx+\frac {1}{2} \int \frac {1}{\frac {1}{2}+x} \, dx-\frac {1}{2} \int \frac {1}{1+x} \, dx \\ & = -\frac {1}{2} \log (1-2 x)+\frac {1}{2} \log (1-x)-\frac {1}{2} \log (1+x)+\frac {1}{2} \log (1+2 x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.74 \[ \int \frac {1+2 x^2}{1-5 x^2+4 x^4} \, dx=-\frac {1}{2} \log \left (1-x-2 x^2\right )+\frac {1}{2} \log \left (1+x-2 x^2\right ) \]

[In]

Integrate[(1 + 2*x^2)/(1 - 5*x^2 + 4*x^4),x]

[Out]

-1/2*Log[1 - x - 2*x^2] + Log[1 + x - 2*x^2]/2

Maple [A] (verified)

Time = 0.04 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.67

method result size
risch \(\frac {\ln \left (2 x^{2}-x -1\right )}{2}-\frac {\ln \left (2 x^{2}+x -1\right )}{2}\) \(26\)
parallelrisch \(\frac {\ln \left (x -1\right )}{2}-\frac {\ln \left (x +1\right )}{2}-\frac {\ln \left (x -\frac {1}{2}\right )}{2}+\frac {\ln \left (x +\frac {1}{2}\right )}{2}\) \(26\)
default \(\frac {\ln \left (1+2 x \right )}{2}-\frac {\ln \left (2 x -1\right )}{2}-\frac {\ln \left (x +1\right )}{2}+\frac {\ln \left (x -1\right )}{2}\) \(30\)
norman \(\frac {\ln \left (1+2 x \right )}{2}-\frac {\ln \left (2 x -1\right )}{2}-\frac {\ln \left (x +1\right )}{2}+\frac {\ln \left (x -1\right )}{2}\) \(30\)

[In]

int((2*x^2+1)/(4*x^4-5*x^2+1),x,method=_RETURNVERBOSE)

[Out]

1/2*ln(2*x^2-x-1)-1/2*ln(2*x^2+x-1)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.64 \[ \int \frac {1+2 x^2}{1-5 x^2+4 x^4} \, dx=-\frac {1}{2} \, \log \left (2 \, x^{2} + x - 1\right ) + \frac {1}{2} \, \log \left (2 \, x^{2} - x - 1\right ) \]

[In]

integrate((2*x^2+1)/(4*x^4-5*x^2+1),x, algorithm="fricas")

[Out]

-1/2*log(2*x^2 + x - 1) + 1/2*log(2*x^2 - x - 1)

Sympy [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.67 \[ \int \frac {1+2 x^2}{1-5 x^2+4 x^4} \, dx=\frac {\log {\left (x^{2} - \frac {x}{2} - \frac {1}{2} \right )}}{2} - \frac {\log {\left (x^{2} + \frac {x}{2} - \frac {1}{2} \right )}}{2} \]

[In]

integrate((2*x**2+1)/(4*x**4-5*x**2+1),x)

[Out]

log(x**2 - x/2 - 1/2)/2 - log(x**2 + x/2 - 1/2)/2

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.74 \[ \int \frac {1+2 x^2}{1-5 x^2+4 x^4} \, dx=\frac {1}{2} \, \log \left (2 \, x + 1\right ) - \frac {1}{2} \, \log \left (2 \, x - 1\right ) - \frac {1}{2} \, \log \left (x + 1\right ) + \frac {1}{2} \, \log \left (x - 1\right ) \]

[In]

integrate((2*x^2+1)/(4*x^4-5*x^2+1),x, algorithm="maxima")

[Out]

1/2*log(2*x + 1) - 1/2*log(2*x - 1) - 1/2*log(x + 1) + 1/2*log(x - 1)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.85 \[ \int \frac {1+2 x^2}{1-5 x^2+4 x^4} \, dx=\frac {1}{2} \, \log \left ({\left | 2 \, x + 1 \right |}\right ) - \frac {1}{2} \, \log \left ({\left | 2 \, x - 1 \right |}\right ) - \frac {1}{2} \, \log \left ({\left | x + 1 \right |}\right ) + \frac {1}{2} \, \log \left ({\left | x - 1 \right |}\right ) \]

[In]

integrate((2*x^2+1)/(4*x^4-5*x^2+1),x, algorithm="giac")

[Out]

1/2*log(abs(2*x + 1)) - 1/2*log(abs(2*x - 1)) - 1/2*log(abs(x + 1)) + 1/2*log(abs(x - 1))

Mupad [B] (verification not implemented)

Time = 0.31 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.36 \[ \int \frac {1+2 x^2}{1-5 x^2+4 x^4} \, dx=-\mathrm {atanh}\left (\frac {x}{2\,x^2-1}\right ) \]

[In]

int((2*x^2 + 1)/(4*x^4 - 5*x^2 + 1),x)

[Out]

-atanh(x/(2*x^2 - 1))